<template>
     <div class="group">
            <div class="cell-box first-cell-box" >
                <div class="news-box flex" @click="goleave(list.proxyId)" v-for="(list,index) in contengList" :key="index">
                    <img :src="list.contentIdHeadImgUrl" alt="" class="left">
                    <div class="center">
                        <div class="name-box">{{list.contentIdNickName}}给你留言啦</div>
                        <div class="section-line">
                             {{list.content}}
                        </div>
                        <div class="section-line supplement">
                            <span>{{list.createDateName}}</span>
                        </div>
                    </div>
                    <div class="right">
                    </div>
                </div>
            </div>
      </div>
</template>
<script>
  import axios from '@/api/request'
export default {
     data() {
        return {
            contengList:'',
        }
     },
     created() {
            this.getleave()
        },
     methods: {
         getleave(){
              var data={
                  contentId:this.$route.query.userId
              }
              var self=this
              axios('/device/news/allNews','post',data).then(res=>{
                     console.log(res)  
                    if(res.data.code==1000){
                        console.log(11) 
                        console.log(res) 
                        self.contengList=res.data.data
                    }
                })
            },
            goleave(id){
                this.$router.push({path: '/secGoodsDetail',query:{goodsId:id}})
           
            },
         }
}
</script>
<style lang="less" scoped>
    .demo-content {
        padding: 10px 10px;
    }
    .message-warp{
        height: 100%;
        box-sizing: border-box;
        // padding-top: 20rem/75;
        background: rgb(242,243,247);

        .vux-tab-wrap{
            padding-top: 0;
            height: 44px;
        }
    }
    .cell-box:nth-child(1){
        background: #eee;
    }
    .news-box {
        width: 100%;
        background: #fff;
        height: 180rem/75;
        border-bottom: 1rem/37.5 solid #dbdbdb;
        .left {
            width: 78rem/75;
            height: 78rem/75;
            border-radius: 50%;
            margin-left: 22rem/75;
            margin-top: 36rem/75;
        }
        .center {
            width: 462rem/75;
            margin-left: 22rem/75;
            margin-top: 34rem/75;
            margin-left: 18rem/75;
            margin-right: 20rem/75;
            .name-box {
                font-size: 13rem/37.5;
                color: #444444;
                font-weight: 600;
            }
            .section-line {
                font-size: 12rem/37.5;
                color: #999999;
                margin-top: 3rem/37.5;
                overflow: hidden;
                text-overflow:ellipsis;
                white-space: nowrap;
            }
            .supplement{
                display: flex;
                justify-content: space-between;
                margin-top: 12rem/37.5;
                padding-bottom: 6rem/37.5;
            }
        }
        .right{
            margin-top: 34rem/75;
            width: 110rem/75;
            height: 110rem/75;
            border-radius: 6px;
            .redTip{
                background: #ff4444;
                width: 76rem/75;
                height: 36rem/75;
                line-height: 36rem/75;
                border-radius: 36rem/75;
                text-align: center;
                color: #fff;
            }
        }
    }
    .first-cell-box .news-box{
        .right{
            margin-top: 72rem/75;
        }
    }
    .bom-tip{
        padding-top: 44rem/75;
        text-align: center;
        color: #999;
        font-size: 20rem/75;
    }
</style>

<style>
    .message-warp .vux-tab .vux-tab-item.vux-tab-selected {
        color: #feba4e;
    }

    .message-warp .vux-tab .vux-tab-item {
        color: #333333;
    }
</style>
